<%-- 
    Document   : purchase
    Created on : Apr 16, 2013, 4:47:45 AM
    Author     : lohris
--%>

<%@page import="entity.bean.Show"%>
<%@page import="entity.bean.Movie"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>
            ${document}.ready
                {}
        </script>


        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Movie title with date</title>
    </head>
    <body>
        <%

            int noOfMovies = ((Integer) request.getAttribute("noOfMovies")).intValue();
            Movie[] movies = (Movie[]) request.getAttribute("movies");

        %>
        <div id="container">
            <div id="header">
                <div class="noncontent" id="logo">
                    <span>
                        <img src="image/logo.jpg" width="200" height="200" alt="logo"/>
                    </span>
                </div>

                <div class="noncontent" id="title">
                    <h1>Cult Cinema</h1>
                </div>
            </div>

            <div id="body">
                <div id="Menu">
                    <a href="index.jsp">Home</a>
                    <a href="Index">Movies</a>
                    <a href="member.jsp">Member</a>
                    <a href="administrator.jsp">administrator</a>
                </div>
                <div id="content">
                    <div id="MovieInfo">
                        <form action="MovieList" method="POST">
                            <table border="1">
                                <%for (int i = 0; i < noOfMovies; i++) {%>
                                <tr>
                                    <td>
                                        <img src="image/mov<%=movies[i].getId()%>.jpg" title="mov<%=movies[i].getId()%>" width="150" height="150" alt="mov<%=movies[i].getId()%>"/>

                                    </td>
                                    <td>

                                        Name: <%=movies[i].getName()%> <br/>
                                        Cast: <%=movies[i].getCast()%> <br/>
                                        Director: <%=movies[i].getDirector()%><br/>
                                        Categories: <%=movies[i].getCategary()%><br/>
                                        Language: <%=movies[i].getLanguage()%><br/>
                                    </td>
                                    <td> 
                                        <input type="submit" id="selectedMovie<%=i%>Info" name="<%=i%>" value="Buy" />
                                    </td>
                                </tr>
                                <%}%>

                            </table>
                        </form>
                    </div>
                </div>
            </div>

            <div class="noncontent" id="footer">
                <span>
                    <a href="" >Privacy Policy</a>
                    <a href="" >Terms Conditions</a>
                    <a href="" >About Us</a> 
                    <a href="" >Contact Us</a>
                </span>
                <br/>
                <span id="designer">Designed by - Chris Ng, Lusinda Leung<br/></span>
                <span id="copyright">
                    This web site exists to fulfill the coursework requirement of CS4280. Do not use your real	personal data as input.
                </span>
            </div>
        </div>
    </body>
</body>
</html>
